﻿using System;
using System.Collections;
using System.Configuration;
using System.Data; 
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Runda.CMS.Common.Utility;
using System.Text;
using Runda.CMS.Bll;
using Runda.CMS.Common.Entity; 

namespace Runda.CMS.Portal.NoticeManage
{
    public partial class DESKTOP_DutyList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindDuty(AspNetPager1.CurrentPageIndex);
          }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            BindDuty(AspNetPager1.CurrentPageIndex);
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            BindDuty(AspNetPager1.CurrentPageIndex);
        }

        private void BindDuty(int pageindex)
        {
            int RecordCount = 0;
            DataTable dt = new SystemBll().QueryDuty("", "Date asc", AspNetPager1.PageSize, pageindex, out RecordCount);

            AspNetPager1.RecordCount = RecordCount;
            gridAccessoryList.DataSource = dt;
            gridAccessoryList.DataBind();
        }
    }
}
